

#ifndef __PLUGIN_SCHEDULING_H__
#define __PLUGIN_SCHEDULING_H__

class Scheduler
{
private:
  uint32_t max_threads;
public:

  Scheduler(uint32_t threads) : max_threads(threads) {}

  virtual ~Scheduler() {}

  uint32_t get_max_threads()
  {
    return max_threads;
  }

  virtual uint32_t count(void)= 0;

  virtual bool add_connection(Session *session)= 0;

  virtual bool end_thread(Session *, bool) {return false;}

  virtual bool init_new_connection_thread(void)
  {
    if (db_thread_init())
      return true;
    return false;
  }

  virtual void post_kill_notification(Session *) {}
};  // Scheduler

#endif /* __PLUGIN_SCHEDULING_H__ */
